import { request } from '@/utils/request'
import qs from 'query-string'

export const addMemory = (data) =>
  request({
    method: 'POST',
    url: '/memory/add',
    data: qs.stringify(data)
  })
export const getMemory = () =>
  request({
    method: 'GET',
    url: '/memory/all'
  })

export const deleteMemory = (target) =>
  request({
    method: 'DELETE',
    url: `/memory/delete/${target}`
  })
export const updateMemory = (data) =>
  request({
    method: 'POST',
    url: '/memory/update',
    data: qs.stringify(data)
  })
